Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[macOS] Support text input autocomplete#39460

Merged
cbracken merged 1 commit intoflutter:mainfrom
cbracken:textfield-touchbar
Feb 8, 2023
Merged

[macOS] Support text input autocomplete#39460
cbracken merged 1 commit intoflutter:mainfrom
cbracken:textfield-touchbar

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Feb 7, 2023

By default, autocomplete is enabled during text input on macOS. On Macs with the touchbar enabled, the current text input and any suggested autocompletions are listed in the touchbar.

This adds support for disabling autocomplete when autofill is disabled, when obscureText is set in the text input configuration, and when the autofill hint type is "password" or "username". When an AutofillGroup is in use, we disable autocomplete for all fields within the group when any of the fields disables autocomplete.

While OS-level autocomplete support is far more robust on iOS, this behaviour matches out enable/disable state management behaviour on that platform.

Issue: flutter/flutter#119824

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but please also get approval from someone that's more familiar with the text input plugin

@loic-sharma
Copy link
Member

/cc @knopp as you worked in this area recently

@cbracken cbracken requested a review from knopp February 7, 2023 21:54
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

By default, autocomplete is enabled during text input on macOS. On Macs
with the touchbar enabled, the current text input and any suggested
autocompletions are listed in the touchbar.

This adds support for disabling autocomplete when autofill is disabled,
when obscureText is set in the text input configuration, and when the
autofill hint type is "password" or "username". When an AutofillGroup is
in use, we disable autocomplete for all fields within the group when any
of the fields disables autocomplete.

While OS-level autocomplete support is far more robust on iOS, this
behaviour matches our enable/disable state management behaviour on that
platform.

Issue: flutter/flutter#119824
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants